package win.somereason.test.baseline_web.biz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import win.somereason.test.baseline_web.dao.CarMapper;
import win.somereason.test.baseline_web.entity.Car;

import java.util.List;

/**
 * Created by Qingsheng.Sun on 2018/3/13.
 */
@Component
public class CarBiz {
    @Autowired
    CarMapper carDao;

    public void add(Car car){
        carDao.add(car);
    }
    public List<Car> queryAll() {
        return carDao.queryAll();
    }
    public Car queryById(int id){
        return carDao.selectById(id);
    }
}
